package io.litchi.starter.oss.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * oss配置
 *
 * @author helang
 * @since 2025-09-19
 */
@ConfigurationProperties(prefix = "litchi.oss")
@Data
public class LitchiOssProperties {
    /**
     * Endpoint:
     */
    private String endpoint;

    /**
     * AccessKey ID
     */
    private String accessKey;

    /**
     * AccessKey Secret
     */
    private String secretKey;


    /**
     * 过期时间 ms
     */
    private Long expire = 1000*60*60L;

    /**
     * Region: 如 oss-cn-beijing, ap-beijing, us-east-1
     */
    private String region = "us-east-1"; // 默认

    /**
     * Bucket 名称
     */
    private String bucket;

    /**
     * 是否启用 path-style 访问（MinIO 通常需要）
     */
    private boolean pathStyleAccess = false;

    /**
     * 大文件 分级名称
     */
    private String bigFilePrefix = "big-file/";
}